//
//  FoucsTableViewCell.m
//  MoGuRadio
//
//  Created by dlios on 15/6/6.
//  Copyright (c) 2015年 mogu.com 蘑菇科技. All rights reserved.
//

#import "FoucsTableViewCell.h"

@implementation FoucsTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        
        self.hotFoucsLabel = [[UILabel alloc] init];
        self.hotFoucsLabel.backgroundColor = [UIColor orangeColor];
        [self.contentView addSubview:self.hotFoucsLabel];
        [_hotFoucsLabel release];
        
        
        self.hotFoucsBtn1 = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.contentView addSubview:self.hotFoucsBtn1];
        
        self.hotFoucsBtn2 = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.contentView addSubview:self.hotFoucsBtn2];
        
        self.hotFoucsBtn3 = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.contentView addSubview:self.hotFoucsBtn3];
        
        self.hotFoucsBtn4 = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.contentView addSubview:self.hotFoucsBtn4];
        
        self.hotFoucsBtn5 = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.contentView addSubview:self.hotFoucsBtn5];
        
        self.hotFoucsBtn6 = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.contentView addSubview:self.hotFoucsBtn6];
        
        
        
    }
    
    return self;
    
}



- (void)layoutSubviews
{
    
    [super layoutSubviews];
    
    CGFloat width = self.contentView.bounds.size.width / 5;
    CGFloat height = self.contentView.bounds.size.height;
    
    
    self.hotFoucsBtn1.frame = CGRectMake(width, 0, 35, 35);
    self.hotFoucsBtn2.frame = CGRectMake(width * 2, 0, 35, 35);
    self.hotFoucsBtn3.frame = CGRectMake(width * 4, 0, 35, 35);
    
    self.hotFoucsBtn4.frame = CGRectMake(width, height / 3, 35, 35);
    self.hotFoucsBtn5.frame = CGRectMake(width * 2, height / 3, 35, 35);
    self.hotFoucsBtn6.frame = CGRectMake(width * 4, height / 3, 35, 35);
    
}


- (void)dealloc
{
    [_hotFoucsLabel release];
    [super dealloc];
    
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
